<template>
  <div class="app">
    <h2>我是App</h2>
    <Child 
      :gender="gender" 
      :updateGender="updateGender"
    />
  </div>
</template>

<script>
  import Child from './components/Child.vue'
  export default {
    name:'App',
    components:{Child},
    data() {
      return {
        gender:'male'
      }
    },
    methods: {
      updateGender(value){
        this.gender = value
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    padding: 20px;
  }
</style>